﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="Nganhdaotao.aspx.cs" Inherits="NCKH.Admin.Nganhdaotao" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
     <div style="margin:2px 5px auto 90px">
       <h2 style="color:red; text-align:left">Quản lý ngành đào tạo</h2><br />
       <table style="margin-left:0px" >
           <tr>
               <td>Tên ngành đào tạo</td>
               <td><asp:TextBox ID="txtNDT" runat="server"></asp:TextBox></td>
               <td>
                   <asp:RequiredFieldValidator ID="rpvTenNDT" runat="server"
                        ControlToValidate="txtNDT" Text="Thiếu tên nhà xuất bản">*
                    </asp:RequiredFieldValidator>
                   <asp:Label ID="lblNDT" runat="server"></asp:Label>

               </td>
           </tr>
           <tr>
               <td></td>
               <td><asp:Button ID="btnThem" runat="server" Text="Thêm mới" OnClick="btnThem_Click"/>
                   <asp:Button ID="btnBoqua" runat="server" Text="Bỏ qua" CausesValidation="false" OnClick="btnBoqua_Click"/>
               </td>
           </tr>
       </table><br />
    <asp:GridView ID="grvNDT" runat="server" AutoGenerateColumns="False" CellSpacing="25" CellPadding="20" 
            EnableModelValidation="True" 
            onrowcommand="grvNDT_RowCommand" 
            DataKeyNames="MaNganh"
            OnRowCancelingEdit="grvNDT_RowCancelingEdit"
            OnRowEditing="grvNDT_RowEditing"
            OnRowUpdating="grvDNT_RowUpdating" Width="424px">
            
            
         <Columns>
                <asp:BoundField DataField="Tennganh" HeaderText="Tên ngành đào tạo" SortExpression="Tennganh" />
                <asp:TemplateField HeaderText="&nbsp;Xoá &nbsp;">
                    <ItemTemplate>
                        <asp:LinkButton ID="LinkButton1" runat="server" 
                        CommandName="xoa" 
                        CausesValidation="false"
                        CommandArgument='<%# Eval("MaNganh") %>'
                        OnClientClick='return confirm("Bạn có chắc chắn muốn xoá không?");'>Xoá</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <%--<asp:TemplateField HeaderText="&nbsp;Sửa &nbsp;">
                    <ItemTemplate>
                        <a href='Nhaxuatban_Sua.aspx?pid=<%# Eval("MaNganh") %>'>Sửa</a>
                    </ItemTemplate>
                </asp:TemplateField>--%>
             <asp:CommandField ShowEditButton="true" HeaderText="Cập nhật" CausesValidation="false" CancelText="Thay đổi" UpdateText="Sửa" EditText="Cập nhật" />
            </Columns>
    </asp:GridView>
    </div>

</asp:Content>
